#include "mypushbutton.h"
#include<QDebug>

/*mypushbutton::mypushbutton(QWidget *parent) : QPushButton(parent)
{

}*/
mypushbutton::mypushbutton(QString normalimg, QString pressimg)
{
    this->normalimgpath=normalimg;
    this->pressimgpath=pressimg;
    QPixmap pix;
    bool ret=pix.load(normalimg);
    if(!ret)
    {
        qDebug()<<"error";
        return;

    }
    this->setFixedSize(pix.width(),pix.height());
    this->setStyleSheet("QPushButton{border:0px;}");
    this->setIcon(pix);
    this->setIconSize(QSize(pix.width()*0.5,pix.height()*0.5));
}
